package Week3.J0501;

import java.util.Scanner;

public class 平方数 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long n = Long.parseLong(scanner.next());
        long ret = 0;
        long x1 = (long) Math.pow(n, 0.5);
        long x2 = x1 + 1;
        ret = (long)
                (Math.abs(Math.pow(x1, 2)-n) < Math.abs(Math.pow(x2, 2)-n) ?
                        Math.pow(x1, 2) : Math.pow(x2, 2));
        System.out.println(ret);
    }
}
